<template>
  <div class="">
    <div class="">/home</div>
    <!-- <el-button v-if="auth.token" type="primary" @click="auth.signOut()"
      >注销</el-button
    >
    <nuxt-link
      v-else
      :to="{
        path: '/signIn',
      }"
      custom
      v-slot="{ navigate, href }"
    >
      <el-button type="primary" :href="href" @click="navigate">登录</el-button>
    </nuxt-link>
    <nuxt-link to="/about" custom v-slot="{ navigate, href }">
      <el-button type="primary" :href="href" @click="navigate">about</el-button>
    </nuxt-link>
    <nuxt-link to="/userinfo?t=16668" custom v-slot="{ navigate, href }">
      <el-button type="primary" :href="href" @click="navigate"
        >userinfo</el-button
      >
    </nuxt-link>
    <nuxt-link to="/news" custom v-slot="{ navigate, href }">
      <el-button type="primary" :href="href" @click="navigate">news</el-button>
    </nuxt-link> -->
    <el-button type="primary" size="default" @click="onClick()"></el-button>
    <!-- <div class="">{{ isDark }}</div> -->
  </div>
</template>

<script setup lang="ts">
// import fetchMock from '~~/mockServer';
// import Mock from 'mockjs';
// import consola from 'consola';
// import db from '~/mock/db/index2';
definePageMeta({
  // layout: 'main',
});

async function onClick() {
  isDark.value = !isDark.value;
  // console.log(db);
  // const res = fetch('/user/user');
  // const res = await useMock('/dict', {
  //   method: 'get',
  //   query: {
  //     parent: 'system-menu-type',
  //   },
  // });
  // consola.success('🚀 ~ file: index.vue:41 ~ onClick ~ res:', res);
  // const res2 = await $fetch('/api/news');
  // console.log('🚀 ~ file: index.vue:47 ~ onClick ~ res2:', res2);
}
// const isDark = useDark();

// const f1 = useFetchApi();
// const f2 = useFetchApi();
</script>
